package com.example.demo.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonInclude;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 收藏作者表(FavoriteAuthor)实体类
 *
 * @author 杨丽辉
 * @since 2021-03-06 17:24:14
 */
@ApiModel("收藏作者表")
@JsonInclude(JsonInclude.Include.NON_NULL)
public class FavoriteAuthor implements Serializable {
    private static final long serialVersionUID = -42120752274056279L;
        /**
    *主键
    * 表id
    * isnull 1
    */
    @ApiModelProperty(value="表id", position=1)
    @TableId(type = IdType.ASSIGN_ID)
    private String favoriteAuthorId;

    /**
    * 被关注的作者id
    * isnull 0
    */        @ApiModelProperty(value="被关注的作者id",position=2)
    private String authorId;
    /**
    * 关注人id（用户id或作者id）
    * isnull 0
    */        @ApiModelProperty(value="关注人id（用户id或作者id）",position=3)
    private String userId;
    /**
    * 关注时间
    * isnull 0
    */        @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
        @ApiModelProperty(value="关注时间",position=4)
    private LocalDateTime favoriteTime;
    /**
    * 被关注的作者昵称
    * isnull 0
    */        @ApiModelProperty(value="被关注的作者昵称",position=5)
    private String authorNickname;
    /**
    * 关注者昵称
    * isnull 0
    */        @ApiModelProperty(value="关注者昵称",position=6)
    private String userNickname;
    /**
    * 关注者身份（0：作者；1：普通读者）
    * isnull 0
    */        @ApiModelProperty(value="关注者身份（0：作者；1：普通读者）",position=7)
    private Integer userRole;
        
    public String getFavoriteAuthorId() {
        return favoriteAuthorId;
    }

    public void setFavoriteAuthorId(String favoriteAuthorId) {
        this.favoriteAuthorId = favoriteAuthorId;
    }
        
    public String getAuthorId() {
        return authorId;
    }

    public void setAuthorId(String authorId) {
        this.authorId = authorId;
    }
        
    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }
        
    public LocalDateTime getFavoriteTime() {
        return favoriteTime;
    }

    public void setFavoriteTime(LocalDateTime favoriteTime) {
        this.favoriteTime = favoriteTime;
    }
        
    public String getAuthorNickname() {
        return authorNickname;
    }

    public void setAuthorNickname(String authorNickname) {
        this.authorNickname = authorNickname;
    }
        
    public String getUserNickname() {
        return userNickname;
    }

    public void setUserNickname(String userNickname) {
        this.userNickname = userNickname;
    }
        
    public Integer getUserRole() {
        return userRole;
    }

    public void setUserRole(Integer userRole) {
        this.userRole = userRole;
    }

        @Override
    public String toString() {
        return "{" +
                    " \"favoriteAuthorId\":" + favoriteAuthorId +
                                  " ,\"authorId\":" + authorId +
                            " ,\"userId\":" + userId +
                            " ,\"favoriteTime\":" + favoriteTime +
                            " ,\"authorNickname\":" + authorNickname +
                            " ,\"userNickname\":" + userNickname +
                            " ,\"userRole\":" + userRole +
                  '}';
    }


}
